﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WPFInterview
{
    /// <summary>
    /// Interaction logic for ControlTemplate.xaml
    /// </summary>
    public partial class ControlTemplateQuestion : UserControl
    {
        public ControlTemplateQuestion()
        {
            InitializeComponent();
        }

        private void _exportTempalte_Click(object sender, RoutedEventArgs e)
        {
            TextBox text = new TextBox();                        
            //System.IO.FileStream stream = 
            //    new System.IO.FileStream("c:\\template.xml",
            //    System.IO.FileMode.Append);
            //
            //System.Windows.Markup.XamlWriter.Save(text.Template, stream);

        }
    }

    public class ControlTempalteTest : IQuestion
    {
        public string TestName
        {
            get { return "WPF - Control Template"; }
        }

        public UserControl getUserControl()
        {
            return new ControlTemplateQuestion();
        }
    }

}
